﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using MvcEngine.Core;

namespace MvcEngine.HtmlText.Components.Extensions
{
    public static class UrlHelperExtensions
    {
        #region BackOffice
        
        public static string EditText(this UrlHelper urlHelper, int ctrId)
        {
            return urlHelper.RouteUrl("BackOffice_HtmlTextEdit", new { ctrId = ctrId });
        }

        public static string SaveText(this UrlHelper urlHelper, int ctrId)
        {
            return urlHelper.RouteUrl("BackOffice_HtmlTextSave", new { ctrId = ctrId });
        }

        public static string UploadFile(this UrlHelper urlHelper, int ctrId)
        {
            return urlHelper.RouteUrl("BackOffice_HtmlTextUploadFile", new { ctrId = ctrId });
        }

        public static string HtmlTexts(this UrlHelper urlHelper, int pageNumber)
        {
            return urlHelper.RouteUrl("BackOffice_HtmlTextPaging", new { pageNumber = pageNumber });
        }

        public static string HtmlTexts(this UrlHelper urlHelper)
        {
            return urlHelper.RouteUrl("BackOffice_HtmlTextList");
        }

        #endregion

        #region StarterSite
        
        public static string HtmlTextFile(this UrlHelper urlHelper, int ctrId, string fileName)
        {
            return urlHelper.RouteUrl("HtmlTextFile", new { ctrId = ctrId, fileName = fileName });
        }

        #endregion
    }
}
